import http from '../axios'

export default {
  getList() {
    return http('get', '/api/song/list')
  },
  add(obj) {
    return http('post', '/api/song/add', obj)
  },
  update(obj) {
    return http('post', '/api/song/update', obj)
  },
  delete(id) {
    return http('post', '/api/song/delete', { id: id })
  },
  getDetail(id) {
    return http('get', '/api/song/getDetail', { id: id })
  },
  getListByParams(paramObj) {
    return http('get', '/api/song/listByParams', paramObj)
  },
  getUploadToken() {
    return http('get', '/api/qiniu/getUploadToken')
  },
  //获取带有目标文件名的token
  getUploadToken2(targetName) {
    return http('get', '/api/qiniu/getUploadToken2', { targetName: targetName })
  }
}